//
//  TennisView.m
//  MY Project For Sport
//
//  Created by dllo on 16/2/1.
//  Copyright © 2016年 dilo. All rights reserved.
//

#import "TennisView.h"
#import <DKNightVersion.h>

#define WIDTH self.frame.size.width
#define HEIGHT self.frame.size.height

#define WEIGHTT [UIScreen mainScreen].bounds.size.width / 375
#define HEIGHTT [UIScreen mainScreen].bounds.size.height / 667


@interface TennisView ()
@property (nonatomic, retain) UILabel *labelForName;
@property (nonatomic, retain) UILabel *labelForNation;
@property (nonatomic, retain) UILabel *labelForScore;
@property (nonatomic, retain) UILabel *labelForCount;

@end

@implementation TennisView

- (instancetype)initWithFrame:(CGRect)frame {

    self = [super initWithFrame:frame];
    if (self) {
        [self createSubview];
    }

    return self;


}

- (void)createSubview {
    self.labelForName = [[UILabel alloc] initWithFrame:CGRectMake(WIDTH / 15, WIDTH / 28, WIDTH / 4 , WIDTH / 15)];
    [self addSubview:self.labelForName];
    [_labelForName release];
    self.labelForName.text = @"ATP";
    self.labelForName.font = [UIFont systemFontOfSize:19];
    self.labelForName.dk_textColorPicker = DKColorWithColors([UIColor blackColor], [UIColor whiteColor]);
    
    
    self.labelForNation = [[UILabel alloc] initWithFrame:CGRectMake(30 / WEIGHTT + WIDTH / 15 + WIDTH / 5 + WIDTH / 13, WIDTH / 28, WIDTH / 4, WIDTH / 15)];
    [self addSubview:self.labelForNation];
    [_labelForNation release];
    self.labelForNation.font = [UIFont systemFontOfSize:15];
    self.labelForNation.text = @"国家/地区";
    self.labelForNation.dk_textColorPicker = DKColorWithColors([UIColor blackColor], [UIColor whiteColor]);

    self.labelForScore= [[UILabel alloc] initWithFrame:CGRectMake(30 * WEIGHTT + WIDTH / 15 + WIDTH / 4 + WIDTH / 13 * 4, WIDTH / 28, WIDTH / 9, WIDTH / 15)];
    self.labelForScore.text = @"积分";
    [self addSubview:self.labelForScore];
    [_labelForScore release];
    self.labelForScore.dk_textColorPicker = DKColorWithColors([UIColor blackColor], [UIColor whiteColor]);
    self.labelForScore.font = [UIFont systemFontOfSize:15];

    self.labelForCount = [[UILabel alloc] initWithFrame:CGRectMake(30 * WEIGHTT + WIDTH / 20 + WIDTH / 15 + WIDTH / 4 + WIDTH / 13 * 5, WIDTH / 28, WIDTH / 6, WIDTH / 15)];
    [self addSubview:self.labelForCount];
    [_labelForCount release];
    self.labelForCount.text = @"参赛数量";
    self.labelForCount.dk_textColorPicker = DKColorWithColors([UIColor blackColor], [UIColor whiteColor]);
    self.labelForCount.font = [UIFont systemFontOfSize:15];

}



/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
